<?php
	if(isset($_GET['quyen']))
	{
		$id = $_GET['id'];
		$quyen = $_GET['quyen'];
		
		$sql = "UPDATE `tbl_nguoidung` SET `QuyenHan` = $quyen WHERE `MaNguoiDung` = $id";
		$kq = mysql_query($sql);
		
		if($kq)
			header("Location: index.php?do=nguoidung");
		else
			ThongBaoLoi(mysql_error());
	}
	elseif(isset($_GET['khoa']))
	{
		$id = $_GET['id'];
		$khoa = $_GET['khoa'];
		
		$sql = "UPDATE `tbl_nguoidung` SET `Khoa` = $khoa WHERE `MaNguoiDung` = $id";
		$kq = mysql_query($sql);
		
		if($kq)
			header("Location: index.php?do=nguoidung");
		else
			ThongBaoLoi(mysql_error());
	}
	else
	{
		header("Location: index.php?do=nguoidung");
	}
?>